/* Panels */

.ui .panel {
	position: fixed;
	top: 30%;
	left: 30%;
	z-index: 99997;
	background-color: #150f0c;
	min-width: 220px;
	max-width: 360px;
	min-height: 100px;
	max-height: 460px;
	color: #fff;
	padding: 20px;
	box-shadow: 0 0 10px $box-shadow;

	header {
		text-transform: uppercase;
		margin-bottom: 10px;
		cursor: move;
		font-size: 18px;
		text-shadow: -1px -1px #201106;
		font-weight: 300;
		padding: 0;

		a {
			width: 24px;
			height: 24px;
			display: block;
			float: right;
			cursor: pointer;
		}
	}

	section {
		font-size: 12px;

		dl {
			margin: 10px auto;
		}

		dt {
			float: left;
			text-align: right;
			width: 45%;
			line-height: 20px;
			margin-bottom: 5px;
		}

		dd {
			margin-left: 50%;
			line-height: 20px;
			margin-bottom: 5px;
		}

		.buildings.left {
			width: 680px;
			float: left;
			position: relative;
		}

		.buildings-info.right {
			display: none;
			float: left;
			width: 440px;
			margin-left: 10px;
		}
	}

	footer {
		clear: both;
		border: 1px solid #6e5036;
		border-top: none;
		background-color: #150f0c;
		padding: 0 10px 10px 10px;
		margin-top: -2px;

		a {
			width: 46px;
			height: 46px;
			display: inline-block;
			cursor: pointer;
			margin-right: 8px;
			border-radius: 10px;

			&:hover {
				background-color: $panel-footer-btn-bg-hover;
			}
		}
	}

	.toolbar {
		margin-top: 10px;
		clear: both;
		font-size: 14px;

		.btn {
			font-size: 14px;
			color: #fff;
			text-decoration: none;
			text-shadow: -1px -1px #201106;
			font-weight: 300;
			position: relative;
			padding: 8px 20px;
			text-transform: uppercase;
			text-align: center;
			display: inline-block;
			cursor: pointer;
			text-decoration: none;
		}

		.btn.iblock {
			display: inline-block;
			width: auto;
			margin-right: 4px;
		}
	}

	a {
		color: $white;
		text-decoration: underline;
	}
/*
	.section {
		padding: 10px;
	}
*/
	.section {
		padding: 20px;
	}

	fieldset {
		border: 1px solid #6e5036;
		margin-bottom: 10px;

		legend {
			padding: 0 10px;
			margin: auto;
		}

		select {
			width: 100%;
			border: 1px solid $border-dark;
			padding: 4px 0;
		}

		p {
			margin: 10px 0 0 0;
		}
	}

	.b-name {
		font-size: 26px;
		margin: 0 0 10px 0;
	}

	.army-item-inc,
	.army-item-dec,
	.navy-item-inc,
	.navy-item-dec {
		width: 20px;
		height: 20px;
		border: 1px solid $border-dark;
		position: absolute;
		text-decoration: none;
	}

	.army-item-inc,
	.navy-item-inc {
		left: 0;
		top: 0;
		background-color: $green;
		border-bottom-right-radius: 20px;
	}

	.army-item-dec,
	.navy-item-dec {
		right: 0;
		top: 0;
		background-color: $red;
		border-bottom-left-radius: 20px;
	}

	.army-recruiter,
	.navy-recruiter {
		width: 630px;
		float: right;
		padding: 10px 0 0 0;
		max-height: 410px;
		overflow: auto;
	}

	.navy-item,
	.army-item,
	.storage-item {
		width: 75px;
		height: 75px;
		float: left;
		text-align: center;
		margin: 0 4px 4px 0;
		position: relative;
		box-shadow: inset 0 0 30px 0 hsla(26, 62%, 19%, 1);
		border-radius: 4px;
		font-size: 11px;
	}

	.storage-item:hover {
		box-shadow: inset 0 0 30px 0 hsla(26, 62%, 19%, 0.3);
	}

	.navy-item,
	.army-item {
		width: 65px;
		height: 65px;
		font-size: 11px;
		position: relative;
	}

	.storage-item.small {
		width: 46px;
		height: 46px;
		font-size: 11px;
		padding: 4px;
		float: none;
		display: inline-block;
	}

	.storage-item .title {
		width: 100%;
		display: inline-block;
		width: 100%;
		padding-top: 4px;
		font-size: 12px;
	}

	.navy-item span.amount,
	.army-item span.amount,
	.storage-item span.amount {
		position: absolute;
		bottom: 0;
		right: 4px;
	}

	.navy-item img {
		margin: 8px auto 0 auto;
	}

	.army-item img {
		margin: 15px auto 0 auto;
	}

	.storage-item.small img {
		margin: 4px auto 0 auto;
		width: 32px;
		height: 32px;
	}

	.storage-item img {
		width: 32px;
	}

	.settlements-list {
		overflow: auto;
		max-height: 415px;
	}

	.column {
		width: 290px;
		float: left;
	}

	.column-small {
		width: 215px;
		float: left;
	}

	.column-full {
		width: 440px;
		clear: both;
	}

	.column-small:nth-child(2) {
		margin-left: 10px;
	}

	.column:last-of-type {
		margin-left: 10px;
	}

	.army-list,
	.navy-list {
		float: left;
		width: 140px;
		padding: 10px 0 0 0;
	}

	.army-recruiter fieldset,
	.navy-recruiter fieldset {
		display: block;
		float: left;
		margin: 0 10px 10px 0;
		width: 176px;
		position: relative;
	}

	.army-recruiter fieldset:nth-child(3n) {
		margin-right:0 !important;
	}

	.army-recruiter fieldset > img,
	.navy-recruiter fieldset > img {
		float: right;
		cursor: pointer;
		bottom: 10px;
		right: 10px;
		position: absolute;
	}

	.army-recruiter fieldset .info,
	.navy-recruiter fieldset .info {
		float: right;
		width: 100px;
		margin-left: 10px;
	}

	.army-recruiter fieldset .cost,
	.navy-recruiter fieldset .cost {
		float: left;
		width: 60px;
	}

	ul.advices {
		max-height: 300px;
		display: block;
		margin: 0;
		padding: 10px 0 0 0;
		overflow: auto;
	}

	ul.advices li {
		line-height: 30px;
		padding-left: 50px;
	}

	.hired-mercenaries-list {
		max-height: 370px;
		overflow: auto;
	}
}

.ui .panel header .close {
	display: block;
	float: right;
	height: 24px;
	width: 24px;
	display: block;
	overflow: hidden;
	text-indent: -9999em;
}

.ui .panel header .close:hover {
	background-position: left bottom;		
}

.ui .panel section {
	border: 1px solid #6e5036;
	background-color: #150f0c;
	padding: 8px;
}

.ui .panel footer a {
	display: inline-block;
	width: 32px;
	height: 32px;
	line-height: 32px;
	text-align: center;
	padding: 9px;
}

.ui .panel footer a span {
	width: 32px;
	height: 32px;
	line-height: 32px;
	display: block;
	background-size: cover;
}

.ui .panel footer a + a {
	margin-right: 10px;
}

.ui .panel footer a img {
	display: block;
}

.ui .panel .column.preview-image img {
	max-width: 290px;
}

.ui .panel section:after {
	clear: both;
}

.ui .panel .preview-image { 
	height: 300px;
	position: relative;
}

.ui .panel .preview-image img { 
	max-width:100%;
	max-height: 200px; 
	width: auto; 
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
}